/* Busca el nombre del Supplier se ingresa como parametros 
	el nombre del div donde se mostrara los resultados 
	el id de codeSupplier , classSupplier               
*/
function searchNameSupplier(idDiv,supplierCode,supplierClas) {
		var req = null;
		obj = document.getElementById(supplierCode).value;
		obj2 =document.getElementById(supplierClas).value;
		if (window.XMLHttpRequest) {
			req = new XMLHttpRequest();
		} else if (window.ActiveXObject) {
			try {
				req = new ActiveXObject("Msxml2.XMLHTTP");
			} catch (e) {
				try {
					req = new ActiveXObject("Microsoft.XMLHTTP");
				} catch (e) {
				}
			}
		}
		req.onreadystatechange = function( ) {
			if (req.readyState == 4) {
				document.getElementById(idDiv).innerHTML = req.responseText;
			}
		};
		req.open("GET", "SupplySearchNameAction.do?supplierCode="+obj+"&supplierClass="+obj2, true);
		req.setRequestHeader("Content-Type",
				"application/x-www-form-urlencoded");
		req.send(null);
	}
	
	
	
function searchNamePart(obDE,obA,obB,obC,obD) {
		var req = null;

	obj = document.getElementById(obA).value;
	obj2 = document.getElementById(obB).value;
	obj3 = document.getElementById(obC).value;
	obj4 = document.getElementById(obD).value;
		
		if (window.XMLHttpRequest) {
			req = new XMLHttpRequest();
		} else if (window.ActiveXObject) {
			try {
				req = new ActiveXObject("Msxml2.XMLHTTP");
			} catch (e) {
				try {
					req = new ActiveXObject("Microsoft.XMLHTTP");
				} catch (e) {
				}
			}
		}
		req.onreadystatechange = function( ) {
			if (req.readyState == 4) {
				document.getElementById(obDE).innerHTML = req.responseText;
			}
		};
		req.open("GET", "PartSearchNameAction.do?partClass="+obj+"&prefijo="+obj2+"&base="+obj3+"&sufijo="+obj4, true);
		req.setRequestHeader("Content-Type",
				"application/x-www-form-urlencoded");
		req.send(null);
	}